#pragma once
#include "bObject.h"
#include "bReference.h"

template<class A,class B>
class bTuple: public bObject
{
protected:
	const bReference<A> _left;
	const bReference<B> _right;
public:
	bTuple(A* ao,B* bo):_left(ao),_right(bo)
	{
		left();//If either of these are null,
		right();//A null-reference exception will occur.
	}
	A* left() const { return _left.object(); }
	B* right() const { return _right.object(); }
	virtual ~bTuple(void){}
};

template<class A,class B>
std::ostream& operator << ( std::ostream& out, bTuple<A,B>* ptr)
{
	out << "[ Tuple(" << typeid(*(ptr->left())).name() << " :: " << typeid(*(ptr->right())).name() << ") ]";
	return out;
}